

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>存储池归置和存储类 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="多站" href="../multisite/" />
    <link rel="prev" title="HTTP 前端" href="../frontends/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../">Ceph 对象网关</a> &raquo;</li>
        
      <li>存储池归置和存储类</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/radosgw/placement.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../">
          

          
            
            <img src="../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 对象网关</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../frontends/">HTTP 前端</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">存储池归置与存储类</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id2">归置目标</a></li>
<li class="toctree-l3"><a class="reference internal" href="#storage-classes">存储类</a></li>
<li class="toctree-l3"><a class="reference internal" href="#zonegroup-zone">Zonegroup/Zone 配置</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id4">新增一个归置目标</a></li>
<li class="toctree-l4"><a class="reference internal" href="#adding-a-storage-class">新增一个存储类</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#customizing-placement">Customizing Placement</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#default-placement">Default Placement</a></li>
<li class="toctree-l4"><a class="reference internal" href="#user-placement">User Placement</a></li>
<li class="toctree-l4"><a class="reference internal" href="#s3-bucket-placement">S3 Bucket Placement</a></li>
<li class="toctree-l4"><a class="reference internal" href="#swift-bucket-placement">Swift Bucket Placement</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#using-storage-classes">Using Storage Classes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../multisite/">多站配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../multisite-sync-policy/">多站同步策略配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../pools/">存储池的配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../config-ref/">配置参考</a></li>
<li class="toctree-l2"><a class="reference internal" href="../admin/">管理指南</a></li>
<li class="toctree-l2"><a class="reference internal" href="../s3/">S3 API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rgw-cache/">Data caching and CDN</a></li>
<li class="toctree-l2"><a class="reference internal" href="../swift/">Swift API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../adminops/">管理操作 API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api/">Python 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="../nfs/">通过 NFS 导出</a></li>
<li class="toctree-l2"><a class="reference internal" href="../keystone/">与 OpenStack Keystone 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../barbican/">与 OpenStack Barbican 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../vault/">与 HashiCorp Vault 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../kmip/">KMIP Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../opa/">与 Open Policy Agent 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../multitenancy/">多租户</a></li>
<li class="toctree-l2"><a class="reference internal" href="../compression/">压缩</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ldap-auth/">LDAP 认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="../encryption/">服务器端加密</a></li>
<li class="toctree-l2"><a class="reference internal" href="../bucketpolicy/">桶策略</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dynamicresharding/">动态的桶索引重分片</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mfa/">多因子认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sync-modules/">同步模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../notifications/">Bucket Notifications</a></li>
<li class="toctree-l2"><a class="reference internal" href="../layout/">RADOS 中的数据布局</a></li>
<li class="toctree-l2"><a class="reference internal" href="../STS/">STS</a></li>
<li class="toctree-l2"><a class="reference internal" href="../STSLite/">STS Lite</a></li>
<li class="toctree-l2"><a class="reference internal" href="../keycloak/">Keycloak</a></li>
<li class="toctree-l2"><a class="reference internal" href="../role/">Role</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session-tags/">Session Tags</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orphans/">Orphan List and Associated Tooliing</a></li>
<li class="toctree-l2"><a class="reference internal" href="../oidc/">OpenID Connect Provider</a></li>
<li class="toctree-l2"><a class="reference internal" href="../troubleshooting/">故障排除</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../man/8/radosgw/">radosgw 手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../man/8/radosgw-admin/">radosgw-admin 手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../qat-accel/">使用 QAT 为加密和压缩提速</a></li>
<li class="toctree-l2"><a class="reference internal" href="../s3select/">S3-select</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lua-scripting/">Lua Scripting</a></li>
<li class="toctree-l2"><a class="reference internal" href="../d3n_datacache/">D3N Data Cache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../cloud-transition/">Cloud Transition</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="id1">
<h1><a class="toc-backref" href="#id7">存储池归置和存储类</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#id1" id="id7">存储池归置和存储类</a></p>
<ul>
<li><p><a class="reference internal" href="#id2" id="id8">归置目标</a></p></li>
<li><p><a class="reference internal" href="#storage-classes" id="id9">存储类</a></p></li>
<li><p><a class="reference internal" href="#zonegroup-zone" id="id10">Zonegroup/Zone 配置</a></p>
<ul>
<li><p><a class="reference internal" href="#id4" id="id11">新增一个归置目标</a></p></li>
<li><p><a class="reference internal" href="#adding-a-storage-class" id="id12">新增一个存储类</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#customizing-placement" id="id13">Customizing Placement</a></p>
<ul>
<li><p><a class="reference internal" href="#default-placement" id="id14">Default Placement</a></p></li>
<li><p><a class="reference internal" href="#user-placement" id="id15">User Placement</a></p></li>
<li><p><a class="reference internal" href="#s3-bucket-placement" id="id16">S3 Bucket Placement</a></p></li>
<li><p><a class="reference internal" href="#swift-bucket-placement" id="id17">Swift Bucket Placement</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#using-storage-classes" id="id18">Using Storage Classes</a></p></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id8">归置目标</a><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<div class="versionadded">
<p><span class="versionmodified added">New in version Jewel.</span></p>
</div>
<p>Placement targets control which <a class="reference external" href="../pools">Pools</a> are associated with a particular
bucket. A bucket’s placement target is selected on creation, and cannot be
modified. The <code class="docutils literal notranslate"><span class="pre">radosgw-admin</span> <span class="pre">bucket</span> <span class="pre">stats</span></code> command will display its
<code class="docutils literal notranslate"><span class="pre">placement_rule</span></code>.</p>
<p>The zonegroup configuration contains a list of placement targets with an
initial target named <code class="docutils literal notranslate"><span class="pre">default-placement</span></code>. The zone configuration then maps
each zonegroup placement target name onto its local storage. This zone
placement information includes the <code class="docutils literal notranslate"><span class="pre">index_pool</span></code> name for the bucket index,
the <code class="docutils literal notranslate"><span class="pre">data_extra_pool</span></code> name for metadata about incomplete multipart uploads,
and a <code class="docutils literal notranslate"><span class="pre">data_pool</span></code> name for each storage class.</p>
</div>
<div class="section" id="storage-classes">
<span id="id3"></span><h2><a class="toc-backref" href="#id9">存储类</a><a class="headerlink" href="#storage-classes" title="Permalink to this headline">¶</a></h2>
<div class="versionadded">
<p><span class="versionmodified added">New in version Nautilus.</span></p>
</div>
<p>Storage classes are used to customize the placement of object data. S3 Bucket
Lifecycle rules can automate the transition of objects between storage classes.</p>
<p>Storage classes are defined in terms of placement targets. Each zonegroup
placement target lists its available storage classes with an initial class
named <code class="docutils literal notranslate"><span class="pre">STANDARD</span></code>. The zone configuration is responsible for providing a
<code class="docutils literal notranslate"><span class="pre">data_pool</span></code> pool name for each of the zonegroup’s storage classes.</p>
</div>
<div class="section" id="zonegroup-zone">
<h2><a class="toc-backref" href="#id10">Zonegroup/Zone 配置</a><a class="headerlink" href="#zonegroup-zone" title="Permalink to this headline">¶</a></h2>
<p>Placement configuration is performed with <code class="docutils literal notranslate"><span class="pre">radosgw-admin</span></code> commands on
the zonegroups and zones.</p>
<p>The zonegroup placement configuration can be queried with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zonegroup get
{
    &quot;id&quot;: &quot;ab01123f-e0df-4f29-9d71-b44888d67cd5&quot;,
    &quot;name&quot;: &quot;default&quot;,
    &quot;api_name&quot;: &quot;default&quot;,
    ...
    &quot;placement_targets&quot;: [
        {
            &quot;name&quot;: &quot;default-placement&quot;,
            &quot;tags&quot;: [],
            &quot;storage_classes&quot;: [
                &quot;STANDARD&quot;
            ]
        }
    ],
    &quot;default_placement&quot;: &quot;default-placement&quot;,
    ...
}
</pre></div>
</div>
<p>The zone placement configuration can be queried with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zone get
{
    &quot;id&quot;: &quot;557cdcee-3aae-4e9e-85c7-2f86f5eddb1f&quot;,
    &quot;name&quot;: &quot;default&quot;,
    &quot;domain_root&quot;: &quot;default.rgw.meta:root&quot;,
    ...
    &quot;placement_pools&quot;: [
        {
            &quot;key&quot;: &quot;default-placement&quot;,
            &quot;val&quot;: {
                &quot;index_pool&quot;: &quot;default.rgw.buckets.index&quot;,
                &quot;storage_classes&quot;: {
                    &quot;STANDARD&quot;: {
                        &quot;data_pool&quot;: &quot;default.rgw.buckets.data&quot;
                    }
                },
                &quot;data_extra_pool&quot;: &quot;default.rgw.buckets.non-ec&quot;,
                &quot;index_type&quot;: 0
            }
        }
    ],
    ...
}
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you have not done any previous <a class="reference external" href="../multisite">Multisite Configuration</a>,
a <code class="docutils literal notranslate"><span class="pre">default</span></code> zone and zonegroup are created for you, and changes
to the zone/zonegroup will not take effect until the Ceph Object
Gateways are restarted. If you have created a realm for multisite,
the zone/zonegroup changes will take effect once the changes are
committed with <code class="docutils literal notranslate"><span class="pre">radosgw-admin</span> <span class="pre">period</span> <span class="pre">update</span> <span class="pre">--commit</span></code>.</p>
</div>
<div class="section" id="id4">
<h3><a class="toc-backref" href="#id11">新增一个归置目标</a><a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<p>To create a new placement target named <code class="docutils literal notranslate"><span class="pre">temporary</span></code>, start by adding it to
the zonegroup:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zonegroup placement add \
      --rgw-zonegroup default \
      --placement-id temporary
</pre></div>
</div>
<p>Then provide the zone placement info for that target:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zone placement add \
      --rgw-zone default \
      --placement-id temporary \
      --data-pool default.rgw.temporary.data \
      --index-pool default.rgw.temporary.index \
      --data-extra-pool default.rgw.temporary.non-ec
</pre></div>
</div>
</div>
<div class="section" id="adding-a-storage-class">
<span id="id5"></span><h3><a class="toc-backref" href="#id12">新增一个存储类</a><a class="headerlink" href="#adding-a-storage-class" title="Permalink to this headline">¶</a></h3>
<p>To add a new storage class named <code class="docutils literal notranslate"><span class="pre">GLACIER</span></code> to the <code class="docutils literal notranslate"><span class="pre">default-placement</span></code> target,
start by adding it to the zonegroup:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zonegroup placement add \
      --rgw-zonegroup default \
      --placement-id default-placement \
      --storage-class GLACIER
</pre></div>
</div>
<p>Then provide the zone placement info for that storage class:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zone placement add \
      --rgw-zone default \
      --placement-id default-placement \
      --storage-class GLACIER \
      --data-pool default.rgw.glacier.data \
      --compression lz4
</pre></div>
</div>
</div>
</div>
<div class="section" id="customizing-placement">
<h2><a class="toc-backref" href="#id13">Customizing Placement</a><a class="headerlink" href="#customizing-placement" title="Permalink to this headline">¶</a></h2>
<div class="section" id="default-placement">
<h3><a class="toc-backref" href="#id14">Default Placement</a><a class="headerlink" href="#default-placement" title="Permalink to this headline">¶</a></h3>
<p>By default, new buckets will use the zonegroup’s <code class="docutils literal notranslate"><span class="pre">default_placement</span></code> target.
This zonegroup setting can be changed with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin zonegroup placement default \
      --rgw-zonegroup default \
      --placement-id new-placement
</pre></div>
</div>
</div>
<div class="section" id="user-placement">
<h3><a class="toc-backref" href="#id15">User Placement</a><a class="headerlink" href="#user-placement" title="Permalink to this headline">¶</a></h3>
<p>A Ceph Object Gateway user can override the zonegroup’s default placement
target by setting a non-empty <code class="docutils literal notranslate"><span class="pre">default_placement</span></code> field in the user info.
Similarly, the <code class="docutils literal notranslate"><span class="pre">default_storage_class</span></code> can override the <code class="docutils literal notranslate"><span class="pre">STANDARD</span></code>
storage class applied to objects by default.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin user info --uid testid
{
    ...
    &quot;default_placement&quot;: &quot;&quot;,
    &quot;default_storage_class&quot;: &quot;&quot;,
    &quot;placement_tags&quot;: [],
    ...
}
</pre></div>
</div>
<p>If a zonegroup’s placement target contains any <code class="docutils literal notranslate"><span class="pre">tags</span></code>, users will be unable
to create buckets with that placement target unless their user info contains
at least one matching tag in its <code class="docutils literal notranslate"><span class="pre">placement_tags</span></code> field. This can be useful
to restrict access to certain types of storage.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">radosgw-admin</span></code> command can modify these fields directly with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ radosgw-admin user modify \
      --uid &lt;user-id&gt; \
      --placement-id &lt;default-placement-id&gt; \
      --storage-class &lt;default-storage-class&gt; \
      --tags &lt;tag1,tag2&gt;
</pre></div>
</div>
</div>
<div class="section" id="s3-bucket-placement">
<span id="id6"></span><h3><a class="toc-backref" href="#id16">S3 Bucket Placement</a><a class="headerlink" href="#s3-bucket-placement" title="Permalink to this headline">¶</a></h3>
<p>When creating a bucket with the S3 protocol, a placement target can be
provided as part of the LocationConstraint to override the default placement
targets from the user and zonegroup.</p>
<p>Normally, the LocationConstraint must match the zonegroup’s <code class="docutils literal notranslate"><span class="pre">api_name</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">LocationConstraint</span><span class="o">&gt;</span><span class="n">default</span><span class="o">&lt;/</span><span class="n">LocationConstraint</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>A custom placement target can be added to the <code class="docutils literal notranslate"><span class="pre">api_name</span></code> following a colon:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">LocationConstraint</span><span class="o">&gt;</span><span class="n">default</span><span class="p">:</span><span class="n">new</span><span class="o">-</span><span class="n">placement</span><span class="o">&lt;/</span><span class="n">LocationConstraint</span><span class="o">&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="swift-bucket-placement">
<h3><a class="toc-backref" href="#id17">Swift Bucket Placement</a><a class="headerlink" href="#swift-bucket-placement" title="Permalink to this headline">¶</a></h3>
<p>用 Swift 协议创建桶时，可以用 HTTP 头的 <code class="docutils literal notranslate"><span class="pre">X-Storage-Policy</span></code> 设置归置靶。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">X</span><span class="o">-</span><span class="n">Storage</span><span class="o">-</span><span class="n">Policy</span><span class="p">:</span> <span class="n">new</span><span class="o">-</span><span class="n">placement</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="using-storage-classes">
<h2><a class="toc-backref" href="#id18">Using Storage Classes</a><a class="headerlink" href="#using-storage-classes" title="Permalink to this headline">¶</a></h2>
<p>All placement targets have a <code class="docutils literal notranslate"><span class="pre">STANDARD</span></code> storage class which is applied to
new objects by default. The user can override this default with its
<code class="docutils literal notranslate"><span class="pre">default_storage_class</span></code>.</p>
<p>To create an object in a non-default storage class, provide that storage class
name in an HTTP header with the request. The S3 protocol uses the
<code class="docutils literal notranslate"><span class="pre">X-Amz-Storage-Class</span></code> header, while the Swift protocol uses the
<code class="docutils literal notranslate"><span class="pre">X-Object-Storage-Class</span></code> header.</p>
<p>When using AWS S3 SDKs such as <code class="docutils literal notranslate"><span class="pre">boto3</span></code>, it is important that non-default
storage class names match those provided by AWS S3, or else the SDK
will drop the request and raise an exception.</p>
<p>S3 Object Lifecycle Management can then be used to move object data between
storage classes using <code class="docutils literal notranslate"><span class="pre">Transition</span></code> actions.</p>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../multisite/" class="btn btn-neutral float-right" title="多站" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../frontends/" class="btn btn-neutral float-left" title="HTTP 前端" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>